import client from 'webpack-theme-color-replacer/client'
import forElementUI from 'webpack-theme-color-replacer/forElementUI'

// 动态切换主题色
export default function changeThemeColor(newColor) {
    if (/^[a-f0-9]+$/.test(newColor)) {
        newColor = '#' + newColor
    }

    var options = {
        newColors: forElementUI.getElementUISeries(newColor),
    }
    client.changer.changeColor(options)
}

